package com.ctn.information.content;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.Window;

import com.ctn.information.R;
import com.umeng.socialize.view.ActionBarView;

/**
 * 带有社会化组件工具栏的fragment
 * @author Administrator
 *
 */
public abstract class BaseSocailBarActivity extends Activity {

	protected void onCreate(Bundle savedInstanceState) {
		LayoutInflater inflater = this.getLayoutInflater();
		mView = inflater.inflate(R.layout.socialize_action_bar_dock, null);
		ViewGroup parent = (ViewGroup) mView.findViewById(R.id.root);
		// 用于集成ActionBar 的ViewGroup
		ActionBarView socializeActionBar = new ActionBarView(this,"dzm");
		LayoutParams layoutParams = new ViewGroup.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.MATCH_PARENT);
		socializeActionBar.setLayoutParams(layoutParams);
		//添加ActionBar
		parent.addView(socializeActionBar);
		//子类进行初始化组件
		doCreateView();
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
	};
	protected View mView;

	
	protected abstract void doCreateView();
}
